﻿using System;
using System.Collections.Generic;
using System.Text;

namespace com.crawler.components
{
    /// <summary>
    /// 发送消息的委托
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void SendMsgEventHandler(object sender, SendMsgEventArgs e);

    /// <summary>
    /// 消息类型
    /// </summary>
    public enum MsgType
    {
        /// <summary>
        /// 线程信息
        /// </summary>
        Thread,
        /// <summary>
        /// 请求信息
        /// </summary>
        Request,
        /// <summary>
        /// 日志信息
        /// </summary>
        Log
    }

    /// <summary>
    /// 发送消息时间参数类
    /// </summary>
    public class SendMsgEventArgs : EventArgs
    {
        private object m_msg;

        /// <summary>
        /// 消息信息
        /// </summary>
        public object Msg
        {
            get { return m_msg; }
            set { m_msg = value; }
        }

        private MsgType m_msg_type;
        public MsgType MsgType
        {
            get { return m_msg_type; }
            set { m_msg_type = value; }
        }
    }
}
